/**
 * 
 */
package com.zhiren.bookfood.service.user.impl;

import com.zhiren.bookfood.common.util.MD5;
import com.zhiren.bookfood.dao.entity.Users;
import com.zhiren.bookfood.dao.user.UserDAOI;
import com.zhiren.bookfood.service.user.UserServiceI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
 * @author MARCO.PAN
 *
 */
public class UserServiceImpl implements UserServiceI {
	private static final Log log = LogFactory.getLog(UserServiceImpl.class);
	private UserDAOI userDao;

	public Users login(String username, String pwd) {
		log.info("用户登录Service:" + username + "\t" + pwd);
		pwd = MD5.getInstance().getMD5ofStr(pwd);
		return userDao.login(username, pwd);
	}
	
	
	public UserDAOI getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDAOI userDao) {
		this.userDao = userDao;
	}
}
